package com.zksk.mbg.admin.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zksk.common.core.web.domain.BaseEntity;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 订单信息表
 * </p>
 *
 * @author Zksk Acmen
 * @since 2022-12-30
 */
@Data
@Accessors(chain = true)
@TableName("platform_fact_orders")
@ApiModel(value = "Orders对象", description = "订单信息表")
public class Orders extends BaseEntity {

    @ApiModelProperty("订单id")
    @TableId(value = "orders_id", type = IdType.ASSIGN_ID)
    private Long ordersId;

    @ApiModelProperty("订单编号")
    @TableField("orders_code")
    private String ordersCode;

    @ApiModelProperty("用户编号")
    @TableField("member_id")
    private Long memberId;

    @ApiModelProperty("用户名称")
    @TableField("member_name")
    private String memberName;

    @ApiModelProperty("枚举产品编号")
    @TableField("enum_product_id")
    private Long enumProductId;

    @ApiModelProperty("枚举产品名称")
    @TableField("enum_product_name")
    private String enumProductName;

    @ApiModelProperty("上线产品编号")
    @TableField("product_r_id")
    private Long productRId;

    @ApiModelProperty("上线产品名称")
    @TableField("product_r_name")
    private String productRName;

    @ApiModelProperty("平台id")
    @TableField("stations_id")
    private Long stationsId;

    @ApiModelProperty("平台name")
    @TableField("stations_name")
    private String stationsName;

    @ApiModelProperty("客户编号")
    @TableField("customer_id")
    private Long customerId;

    @ApiModelProperty("客户名称")
    @TableField("customer_name")
    private String customerName;

    @ApiModelProperty("机构编号")
    @TableField("orgs_id")
    private Long orgsId;

    @ApiModelProperty("机构名称")
    @TableField("orgs_name")
    private String orgsName;

    @ApiModelProperty("标段编号")
    @TableField("section_code")
    private String sectionCode;

    @ApiModelProperty("标段名称")
    @TableField("section_name")
    private String sectionName;

    @ApiModelProperty("项目编号")
    @TableField("project_code")
    private String projectCode;

    @ApiModelProperty("项目名称")
    @TableField("project_name")
    private String projectName;

    @ApiModelProperty("招标单位编号")
    @TableField("tenderee_id")
    private Long tendereeId;

    @ApiModelProperty("招标单位名称")
    @TableField("tenderee_name")
    private String tendereeName;

    @ApiModelProperty("招标代理机构编号")
    @TableField("agent_id")
    private Long agentId;

    @ApiModelProperty("招标代理机构名称")
    @TableField("agent_name")
    private String agentName;

    @ApiModelProperty("经办人id")
    @TableField("op_id")
    private Long opId;

    @ApiModelProperty("经办人姓名")
    @TableField("op_name")
    private String opName;

    @ApiModelProperty("经办人联系电话")
    @TableField("op_phone")
    private String opPhone;

    @ApiModelProperty("营销人员id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("营销人员姓名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty("担保金额")
    @TableField("security_amount")
    private BigDecimal securityAmount;

    @ApiModelProperty("保费金额")
    @TableField("premium_amount")
    private BigDecimal premiumAmount;

    @ApiModelProperty("支付方式")
    @TableField("pay_type")
    private Integer payType;

    @ApiModelProperty("支付时间")
    @TableField("pay_time")
    private LocalDateTime payTime;

    @ApiModelProperty("支付金额")
    @TableField("pay_amount")
    private BigDecimal payAmount;

    @ApiModelProperty("订单状态（枚举值未定）")
    @TableField("orders_status")
    private Integer ordersStatus;

    @ApiModelProperty("申请时间")
    @TableField("apply_time")
    private LocalDateTime applyTime;

    @ApiModelProperty("开标时间")
    @TableField("open_time")
    private LocalDateTime openTime;

    @ApiModelProperty("删除标识（0 正常 2删除）")
    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer delFlag;


    public static final String ORDERS_ID = "orders_id";

    public static final String ORDERS_CODE = "orders_code";

    public static final String MEMBER_ID = "member_id";

    public static final String MEMBER_NAME = "member_name";

    public static final String ENUM_PRODUCT_ID = "enum_product_id";

    public static final String ENUM_PRODUCT_NAME = "enum_product_name";

    public static final String PRODUCT_R_ID = "product_r_id";

    public static final String PRODUCT_R_NAME = "product_r_name";

    public static final String STATIONS_ID = "stations_id";

    public static final String STATIONS_NAME = "stations_name";

    public static final String CUSTOMER_ID = "customer_id";

    public static final String CUSTOMER_NAME = "customer_name";

    public static final String ORGS_ID = "orgs_id";

    public static final String ORGS_NAME = "orgs_name";

    public static final String SECTION_CODE = "section_code";

    public static final String SECTION_NAME = "section_name";

    public static final String PROJECT_CODE = "project_code";

    public static final String PROJECT_NAME = "project_name";

    public static final String TENDEREE_ID = "tenderee_id";

    public static final String TENDEREE_NAME = "tenderee_name";

    public static final String AGENT_ID = "agent_id";

    public static final String AGENT_NAME = "agent_name";

    public static final String OP_ID = "op_id";

    public static final String OP_NAME = "op_name";

    public static final String OP_PHONE = "op_phone";

    public static final String USER_ID = "user_id";

    public static final String USER_NAME = "user_name";

    public static final String SECURITY_AMOUNT = "security_amount";

    public static final String PREMIUM_AMOUNT = "premium_amount";

    public static final String PAY_TYPE = "pay_type";

    public static final String PAY_TIME = "pay_time";

    public static final String PAY_AMOUNT = "pay_amount";

    public static final String ORDERS_STATUS = "orders_status";

    public static final String APPLY_TIME = "apply_time";

    public static final String OPEN_TIME = "open_time";

    public static final String DEL_FLAG = "del_flag";

    @Override
    public Serializable pkVal() {
        return this.ordersId;
    }

}
